package com.dragee.modules.work.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.dragee.config.resolver.LongJsonDeserializer;
import com.dragee.config.resolver.LongJsonSerializer;
import com.dragee.modules.work.dto.TeamPerson;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 报名项目
 * 
 * @author tc
 * @email tc@mail.com
 * @date 2023-04-24 11:32:01
 */
@Data
@TableName("t_apply_project")
public class ApplyProjectEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId
    @JsonSerialize(using = LongJsonSerializer.class)
    @JsonDeserialize(using = LongJsonDeserializer.class)
    private Long id;

    /**
     * 比赛ID
     */
    private String applyId;



    /**
     * 比赛ID
     */
    private String competitionId;

    /**
     * 比赛ID
     */
    private String projectId;

    /**
     * 运动员ids
     */
    private String athleteIds;

    private String projectCoachIds;

    private String type;

    private String groups;

    /**
     * 费用
     */
    private BigDecimal cost;

    private String orderId;

    /**
     * 状态
     */
    private String status;

    private Integer isImport;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 修改人
     */
    @TableField(fill = FieldFill.UPDATE)
    private String updateBy;

    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    /**
     * 排序字段
     */
    @TableField(fill = FieldFill.INSERT)
    private Long sort;


    @TableField(exist = false)
    private List<TeamPerson> athletes;
    @TableField(exist = false)
    private List<TeamPerson> projectCoachs;
    @TableField(exist = false)
    private String fileMusicUrl;
    @TableField(exist = false)
    private String fileMusicName;
    @TableField(exist = false)
    private String projectName;
    @TableField(exist = false)
    private String fileId;
    @TableField(exist = false)
    private String teamName;
    @TableField(exist = false)
    private BigDecimal score;
    }